package cn.hfjava.kz.config;

import com.aliyun.oss.OSSClient;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 29264
 */
@ConfigurationProperties(prefix = "aliyun.oss")
@Configuration
@Getter
@Setter
public class OssConfig {

    private String endPoint;
    private String accessKeyId;
    private String accessKeySecret;
    private String bucketName;
    @Bean
    public OSSClient ossClient() {

        return new OSSClient(endPoint, accessKeyId, accessKeySecret);
    }
}